cmake_minimum_required(VERSION 3.16)
project(shortCut LANGUAGES CXX)

include(qt.cmake)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR}
    COMPONENTS
        Core
        Gui
        Widgets
        Xml
)
qt_standard_project_setup()

set(PROJECT_SOURCES
    main.cpp
    shortcut.ui
    shortcut.h
    shortcut.cpp
)
aux_source_directory(${PROJECT_SOURCE_DIR}/baseclass BASECLASS)
aux_source_directory(${PROJECT_SOURCE_DIR}/todoclass TODOCLASS)
aux_source_directory(${PROJECT_SOURCE_DIR}/xmloperation XMLOPERATION)
aux_source_directory("${PROJECT_SOURCE_DIR}/global" "GLOBAL")

qt_add_executable(shortCut ${PROJECT_SOURCES} ${BASECLASS} ${TODOCLASS} ${GLOBAL} ${XMLOPERATION})

set_target_properties(shortCut
    PROPERTIES
        WIN32_EXECUTABLE TRUE
)

target_link_libraries(shortCut
    PUBLIC
        Qt::Core
        Qt::Gui
        Qt::Widgets
        Qt::Xml
)
